<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>添加文章</title>
  <script src="./jquery3.6.0.js"></script>
  <script src="js/common.js"></script>
</head>

<body>
  标题: <input type="text" id="title" /> <br />
  父id: <input type="number" id="parentId" /> <br />
  内容: <textarea id="content" style="height: 200px;">内容</textarea> <br />
  <button onclick="add_article()">添加</button>
  <script>
    function add_article() {
      postJson(api+"/article/insert", {
        id: 0,
        parent_id: $("#parentId").val()/1,
        title: $("#title").val(),
        content: $("#content").val(),
        create_time:""
      }, function (data) {
        alert(data.msg);
      }, null);
    }
  </script>
</body>

</html>